<template>
    <div class="card rdsp-card-view" data-page="todayInspect">
        <div class="card-content rank-content card-content-padding">
            <div class="rdsp-card-title">
                <span class="icon"></span> 
                <span>本期巡检</span>
            </div>
            <div class="rdsp-card-con">
                <div class="card-todayInspect">
                    <div class="bg"></div>
                    <div class="todayInspect-block">
                        <a href="/checkApply/0/" id="href_todayInspect-noReceiveNum" data-view=".view-main">
                            <div class="circle blue" id="todayInspect-noReceiveNum">0</div>
                            <p>待领取</p>
                        </a>
                    </div>
                     <div class="todayInspect-block todayInspect-jt">
                        <a href="javascript:void(0)"><div class="circle"><img src="{{staticPath}}img/home/jt.gif"></div></a>
                        <p></p>
                    </div>
                    <div class="todayInspect-block">
                        <a href="/checkApply/1/" id="href_todayInspect-doingTaskNum" data-view=".view-main">
                            <div class="circle lightbule" id="todayInspect-doingTaskNum">0</div>
                            <p>巡检中</p>
                        </a>
                    </div>
                     <div class="todayInspect-block todayInspect-jt">
                        <a href="javascript:void(0)"><div class="circle" ><img src="{{staticPath}}img/home/jt.gif"></div></a>
                        <p></p>
                    </div>
                    <div class="todayInspect-block">
                        <a href="/checkApply/2/" id="href_todayInspect-completedTaskNum" data-view=".view-main">
                            <div class="circle" id="todayInspect-completedTaskNum">0</div>
                            <p>已完成</p>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<style scoped>
</style>
<script>
return {
    data: function() {
        return {}
    },
    methods: {
         showInspectCount:function(){
                var id_org="";
                if (single_Orgid == "") {
                    id_org=userInfor.organizationIds;
                } else {
                    id_org=single_Orgid;
                }
                let startTime = moment().format('YYYY-MM-DD 00:00:00');//开始时间
                let endTime = moment().format('YYYY-MM-DD 23:59:59');//结束时间
                Dao.getNewInspectTaskCount({
                    userName:userInfor.accountName,
                    deviceId:appKeyObj.deviceId,
                    account:userInfor.accountName,
                    orgIds:id_org
                }, function (data) {
                    $("#todayInspect-noReceiveNum").html(
                        common.transNullundefined(data.noReceiveNum.toString())
                    )
                    $("#todayInspect-doingTaskNum").html(
                        common.transNullundefined(data.doingTaskNum.toString())
                    )
                    $("#todayInspect-completedTaskNum").html(
                        common.transNullundefined(data.completedTaskNum.toString())
                    )

                }, true)
            },
    },
    on: {
        pageInit: function(e, page) {
        },
        pageAfterIn: function(e, page) {
            var self = this;
            self.showInspectCount();
        }
    }
}
</script>